import { LcdGroup } from "@/api/service/theme/types";
import { ENUM_DATA_SCOPE } from "@/enum/system.enum";
import { useQuery, useTable } from "@/hook/useTableConfig";
import { IQuery } from "@/interface/IAxios";

export const table = useTable<LcdGroup>();
interface QueryObj {
  themeName: string;
  orderByColumn: string;
  queryType: string;
  scope: ENUM_DATA_SCOPE;
  category: string;
}
let queryObj: QueryObj = {
  themeName: "",
  orderByColumn: "create_time",
  queryType: "0",
  scope: ENUM_DATA_SCOPE.THIS_SHOP,
  category: ""
};
// 查询参数
export const query = useQuery<IQuery<QueryObj>>({
  ...queryObj
});
// 已选中的元素数组
export const keys = ref<string[]>([]);

export const resetQuery = () => {
  query.value = useQuery({
    ...queryObj
  }).value;
};
